/**
 * 创建日期 @Mar 23, 2010
 *
 * 成都天和软件公司
 * 电话：028-85425861
 * 传真：028-85425861-8008
 * 邮编：610041 
 * 版权所有
 */
package  org.fantasy.cpp.core.html.query;

import javax.servlet.http.HttpServletRequest;

import  org.fantasy.cpp.core.bean.ParamContext;

/**
 * 
 * @author 王文成
 * @version: 1.0
 * @since Mar 23, 2010
 */
public class RadioHtml extends AbstractQueryHtml {

    public RadioHtml(HttpServletRequest request, ParamContext param) {
        super(request, param);
    }

    public String getHtml(){
        StringBuffer html = new StringBuffer(512);
        if (defChecked) {
            html.append("<td><input "  + getIsReadonly(code) + "type='radio' name='" + code
                    + "' value='" + defValue + "' checked /></td><td>" + name + "</td>");
        } else {
            html.append("<td><input "  + getIsReadonly(code) + "type='radio' name='" + code
                    + "' value='" + defValue + "' /></td><td>" + name + "</td>");
        }
        return html.toString();
    }
}
